package com.xy.objectadapter;



/**
 * @author 谢阳
 * @version 1.8.0_131
 * @date 2022/6/11 14:41
 * @description 对象适配器
 */
public class Client {
    public static void main(String[] args) {
        System.out.println("====对象适配器模式====");
        Phone phone = new Phone();
        phone.charging(new VoltageAdapter(new Voltage220V()));
        System.out.println("--------------------");
        phone.charging(new VoltageAdapter(null));
    }
}
